var reques={
    get:function(url,data){
         var promise=new Promise(function(resolve,reject){
            url='http://huruqing.cn:3000/api/'+url
            data=data||{}
            $.ajax({
                type: "get",
                url: url,
                dataType: "json",
                success: function (response) {
                    if (response.code==666) {
                        resolve(response)
                    }
                },
                error:function (error) {
                    reject({msg:'网络请求失败'})
                }
            });
        })
        return promise;
    }
   
}